<%-- 
    Document   : consultado
    Created on : 17/02/2012, 06:28:14 PM
    Author     : Gimbet
--%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<logic:present name="area">
    <tiles:insert definition="mensaje" beanName="Area"></tiles:insert>
    <h1>Información del Area</h1><br>
    <div id="paginador"></div> 
    <div id="tableContainer" class="tableContainer">
        <table id="tablaDatos" border="0" cellpadding="0" cellspacing="0" width="30%" class="scrollTable">
            <thead class="fixedHeader" id="fixedHeader">
                <tr>
                    <th> Nombre</th>
                    <th> Codigo </th>
                    <th> Unidad </th>
                    <th> Modificar</th>
                    <th> Eliminar </th>
                </tr>
            </thead>   
            <tbody class="scrollContent">
                <tr>
                    <td>
                        <bean:write name="area" property="nombre"/>
                    </td>
                    <td>
                        <bean:write name="area" property="codigoArea"/>
                    </td>
                    <td>
                        <bean:write name="area" property="codigoUnidad"/>
                    </td>
                    <td>
                        <html:form action="/modificarArea?method=populate" onsubmit="return this">
                            <html:hidden property="codigoArea"></html:hidden>
                            <html:hidden property="codigoUnidad"></html:hidden>                            
                            <html:hidden property="nombre"></html:hidden>
                                <div class="buttons">
                                    <button type="submit" class="regular">
                                        <img src="interfaz/images/modificar.png" alt=""/>
                                    <bean:message key="boton.modificar" />
                                </button>
                            </div> 
                        </html:form>
                    </td>
                    <td>
                        <html:form action="/eliminarArea?method=delete" onsubmit="return confirm('Esta seguro que quiere eliminar esta area?')">
                            <html:hidden property="codigoArea"></html:hidden>
                                <div class="buttons">
                                    <button type="submit" class="negative">
                                        <img src="interfaz/images/eliminar.png" alt=""/>
                                    <bean:message key="boton.eliminar" />
                                </button>
                            </div> 
                        </html:form>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</logic:present>
<script type="text/javascript">

    var p = new Paginador(
    document.getElementById('paginador'),
    document.getElementById('tablaDatos'),
    4
);

    p.Mostrar();
</script>